﻿
(function () {
    appModule.controller('common.views.disputeInformationHandles.workFlowProcess', [
         '$scope', '$uibModalInstance', 'abp.services.app.disputeInformation', 'disputeInformationId', 'abp.services.app.workFlow_Run',
        function ($scope, $uibModalInstance, disputeInformationService, disputeInformationId, workFlow_RunService) {
            var vm = this;
            vm.saving = false;
            //首先将disputeInformation数据设置为null
            vm.disputeInformation = null;


            //取消关闭页面
            vm.cancel = function () {
                $uibModalInstance.dismiss();
            };

            //初始化页面
            function init() {

                disputeInformationService.getDisputeInformationForEditAsync({
                    id: disputeInformationId
                }).then(function (result) {
                    vm.disputeInformation = result.data.disputeInformation;

                    //绑定流程节点明细
                    workFlow_RunService.getAllWorkFlow_Run_ProcessListByDetailID({ detailID: disputeInformationId, processID: vm.disputeInformation.status }).then(function (result) {
                        vm.workFlowRunProcessList = result.data.items;
                    });
                }); 
            }

            //执行初始化方法
            init();
        }
    ]);
})();